namespace JHT.EFMigrationTest.ClassLibrary1.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addStudnetAdderes : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.StudentsAddress",
                c => new
                    {
                        StudentsAddressId = c.Long(nullable: false),
                        Address = c.String(maxLength: 50, unicode: false),
                        City = c.String(maxLength: 50, unicode: false),
                        ZipCode = c.Int(),
                        Province = c.String(maxLength: 50, unicode: false),
                        Country = c.String(maxLength: 50, unicode: false),
                    })
                .PrimaryKey(t => t.StudentsAddressId)
                .ForeignKey("dbo.Students", t => t.StudentsAddressId)
                .Index(t => t.StudentsAddressId);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.StudentsAddress", "StudentsAddressId", "dbo.Students");
            DropIndex("dbo.StudentsAddress", new[] { "StudentsAddressId" });
            DropTable("dbo.StudentsAddress");
        }
    }
}
